import { BaseController } from 'egg-cool-controller';
import router from 'egg-cool-router';

@router.prefix('/api/product', [ 'add', 'delete', 'update', 'info', 'list', 'page' ])
export default class Product extends BaseController {
    init() {
        this.setEntity(this.ctx.repo.Product);
        this.setPageOption({
            addOrderBy: {
                // 查询plan需要按照当天日期和plan.assembly(生产线)过滤
                createTime: 'desc',
            },
        });
        this.setService(this.service.product);
    }
}
